package com.book.bookmanage.controller;


import com.book.bookmanage.model.dto.MenuDto;
import com.book.bookmanage.service.MenuService;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/menu")
public class MenuController {
    @Resource
    private MenuService menuService;

    @PutMapping("/insert")
    public void insert(@Validated @RequestBody MenuDto menu) {
        menuService.insertMenu(menu);
    }
}
